import request from "@/utils/request";

export function getWarehouses(paramters) {
  return request({
    url: "api/v1/warehouses",
    method: "get",
    params: paramters,
    basicDataServer: true,
  });
}


export function getWarehouse(id) {
  return request({
    url: "api/v1/warehouses/"+id,
    method: "get",
    basicDataServer: true,
  });
}

export function addWarehouse(data) {
  return request({
    url: "api/v1/warehouses",
    method: "post",
    data: data,
    basicDataServer: true,
  });
}

export function updateWarehouse(data) {
  return request({
    url: "api/v1/warehouses",
    method: "put",
    data: data,
    basicDataServer: true,
  });
}

export function deleteWarehouse(id) {
  return request({
    url: "api/v1/warehouses/" + id,
    method: "delete",
    basicDataServer: true,
  });
}